﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Cyberwolf.Modules.PWCAPAdmin.Components
{
    public class PWSecurityToken
    {
        public static PWSecurityToken Current
        {
            get { return (PWSecurityToken)HttpContext.Current.Session["PWSecurityToken"]; }
            set { HttpContext.Current.Session["PWSecurityToken"] = value; }
        }

        private string _OrganizationURL;
        public string OrganizationURL
        {
            get { return _OrganizationURL; }
            set { _OrganizationURL = value; }
        }

        private string _Username;
        public string Username
        {
            get { return _Username; }
            set { _Username = value; }
        }

        private string _Password;
        public string Password
        {
            get { return _Password; }
            set { _Password = value; }
        }

        private string _SecurityToken;
        public string SecurityToken
        {
            get { return _SecurityToken; }
            set { _SecurityToken = value; }
        }

        private SecurityInformation _SecurityInfo = new SecurityInformation();
        public SecurityInformation SecurityInfo
        {
            get { return _SecurityInfo; }
            set { _SecurityInfo = value; }
        }

        private PartyInformation _PartyInfo = new PartyInformation();
        public PartyInformation PartyInfo
        {
            get { return _PartyInfo; }
            set { _PartyInfo = value; }
        }

        private string[] _PartyRights;
        public string[] PartyRights
        {
            get { return _PartyRights; }
            set { _PartyRights = value; }
        }

        private ModuleInformation[] _PWAPModules;
        public ModuleInformation[] PWAPModules
        {
            get { return _PWAPModules; }
            set { _PWAPModules = value; }
        }

        public class SecurityInformation
        {
            private string _LogonName;
            public string LogonName
            {
                get { return _LogonName; }
                set { _LogonName = value; }
            }

            private string _Organization;
            public string Organization
            {
                get { return _Organization; }
                set { _Organization = value; }
            }

            private string _Application;
            public string Application
            {
                get { return _Application; }
                set { _Application = value; }
            }

            private string _PartyRole;
            public string PartyRole
            {
                get { return _PartyRole; }
                set { _PartyRole = value; }
            }
        }

        public class PartyInformation
        {
            private string _FirstName;
            public string FirstName
            {
                get { return _FirstName; }
                set { _FirstName = value; }
            }

            private string _LastName;
            public string LastName
            {
                get { return _LastName; }
                set { _LastName = value; }
            }
        }

        private string _ErrorMessage;
        public string ErrorMessage
        {
            get { return _ErrorMessage; }
            set { _ErrorMessage = value; }
        }

        public class ModuleInformation
        {
            private string _ModuleName;
            public string ModuleName
            {
                get { return _ModuleName; }
                set { _ModuleName = value; }
            }

            private string _ModuleTitle;
            public string ModuleTitle
            {
                get { return _ModuleTitle; }
                set { _ModuleTitle = value; }
            }

            private string _Version;
            public string Version
            {
                get { return _Version; }
                set { _Version = value; }
            }
        }
    }
}
